/**
*	@file    \B\2.cpp
*	@date    2013-10-6 17:15
*	@author  Il'yas Garipov <logirz728@gmail.com>
*
*	Primes filter-er.
*
*	@version 1.0.1
*
*	@par First, the number to be inscpected is submitted;
*	@par Output has a and b in "sqrt(n) = sqrt(a)*b"
*/

#include <stdio.h>
#include <math.h>
#include <assert.h>

#define LL_t long long int //!< Shorten naming

#ifndef NDEBUG
	#define DOUT( toprint ) printf( "\n# " toprint )	//!< Debug output, prints a plain text line preceded by #
	#define DPUT( toput , x ) printf( "\n# " toput , x )//!< Debug put, a DOUT with a single variable inside
	#define DLN											//!< Debug line, doesn't exist in release (with NDEBUG defined)
	#define DPUTCLOSURE	DOUT("=============================================================================");\
						DPUT("FILE: %s", __FILE__ );\
						DPUT("COMPILATION DATE: %s", __DATE__ );\
						DPUT("COMPILATION TIME: %s", __TIME__ )//!< Put a closing statement, complete with datestamp and finename.
#else
	#define DOUT
	#define DPUT
	#define DLN if(0)
	#define DPUTCLOSURE
#endif

int main()
{
  DOUT("=======================2007, 1 semester assignment, 2-B=======================\n");
  DOUT("==============================================================================\n");
  DOUT("Please enter a natural number N to be broken down into divisors:\n");
  DOUT("> ");

  LL_t n = 0;
  int chk = scanf("%lld", &n);
  DLN assert(("You have entered a single number" , chk == 1));

	for(LL_t i = ( ((int)sqrt(n))+1 ); i>0; i--) {
		if(  !(n%i) && !( n%(i*i) )  ) {
		
		printf("%lld %lld\n", ( n / (i*i) ),i);
			
		break;
		}
	}

	DPUTCLOSURE;
	return 0;
}
